Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
Ablesons
three.js
提交
f08e10b0
T
three.js
项目概览
Ablesons
/
three.js
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
T
three.js
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
f08e10b0
编写于
1月 22, 2013
作者:
M
Mr.doob
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
Added generator for Sublime Text 2 completion file.
上级
c4262202
变更
5
隐藏空白更改
内联
并排
Showing
5 changed file
with
196 addition
and
3 deletion
+196
-3
utils/build.py
utils/build.py
+2
-3
utils/editors/sublimetext2/README
utils/editors/sublimetext2/README
+1
-0
utils/editors/sublimetext2/threejs.sublime-completions
utils/editors/sublimetext2/threejs.sublime-completions
+126
-0
utils/sublime.py
utils/sublime.py
+64
-0
utils/sublime.sh
utils/sublime.sh
+3
-0
未找到文件。
utils/build.py
浏览文件 @
f08e10b0
...
...
@@ -7,7 +7,6 @@ if sys.version_info < (2, 7):
print
(
"Please, update to a newer version: http://www.python.org/download/releases/"
)
exit
()
import
argparse
import
json
import
os
...
...
@@ -56,8 +55,8 @@ def main(argv=None):
# save
if
args
.
minify
is
False
:
shutil
.
copy
(
path
,
output
)
os
.
chmod
(
output
,
0o664
);
# temp files would usually get 0600
shutil
.
copy
(
path
,
output
)
os
.
chmod
(
output
,
0o664
);
# temp files would usually get 0600
else
:
...
...
utils/editors/sublimetext2/README
0 → 100644
浏览文件 @
f08e10b0
zip threejs.sublime-package threejs.sublime-completions
utils/editors/sublimetext2/threejs.sublime-completions
0 → 100644
浏览文件 @
f08e10b0
{
"scope": "source.js,source.js.embedded.html,source.coffee",
"version": "r55",
"completions":
[
{ "trigger": "THREE.extend", "contents": "THREE.extend( ${1:target}, ${2:other} )$0" },
{ "trigger": "THREE.Color", "contents": "THREE.Color( ${1:value} )$0" },
{ "trigger": "THREE.Vector2", "contents": "THREE.Vector2( ${1:x}, ${2:y} )$0" },
{ "trigger": "THREE.Vector3", "contents": "THREE.Vector3( ${1:x}, ${2:y}, ${3:z} )$0" },
{ "trigger": "THREE.Vector4", "contents": "THREE.Vector4( ${1:x}, ${2:y}, ${3:z}, ${4:w} )$0" },
{ "trigger": "THREE.Box2", "contents": "THREE.Box2( ${1:min}, ${2:max} )$0" },
{ "trigger": "THREE.Box3", "contents": "THREE.Box3( ${1:min}, ${2:max} )$0" },
{ "trigger": "THREE.Matrix3", "contents": "THREE.Matrix3( ${1:n11}, ${2:n12}, ${3:n13}, ${4:n21}, ${5:n22}, ${6:n23}, ${7:n31}, ${8:n32}, ${9:n33} )$0" },
{ "trigger": "THREE.Matrix4", "contents": "THREE.Matrix4( ${1:n11}, ${2:n12}, ${3:n13}, ${4:n14}, ${5:n21}, ${6:n22}, ${7:n23}, ${8:n24}, ${9:n31}, ${10:n32}, ${11:n33}, ${12:n34}, ${13:n41}, ${14:n42}, ${15:n43}, ${16:n44} )$0" },
{ "trigger": "THREE.Ray", "contents": "THREE.Ray( ${1:origin}, ${2:direction} )$0" },
{ "trigger": "THREE.Sphere", "contents": "THREE.Sphere( ${1:center}, ${2:radius} )$0" },
{ "trigger": "THREE.Frustum", "contents": "THREE.Frustum( ${1:p0}, ${2:p1}, ${3:p2}, ${4:p3}, ${5:p4}, ${6:p5} )$0" },
{ "trigger": "THREE.Plane", "contents": "THREE.Plane( ${1:normal}, ${2:constant} )$0" },
{ "trigger": "THREE.Spline", "contents": "THREE.Spline( ${1:points} )$0" },
{ "trigger": "THREE.Triangle", "contents": "THREE.Triangle( ${1:a}, ${2:b}, ${3:c} )$0" },
{ "trigger": "THREE.Vertex", "contents": "THREE.Vertex( ${1:v} )$0" },
{ "trigger": "THREE.UV", "contents": "THREE.UV( ${1:u}, ${2:v} )$0" },
{ "trigger": "THREE.Clock", "contents": "THREE.Clock( ${1:autoStart} )$0" },
{ "trigger": "THREE.EventDispatcher", "contents": "THREE.EventDispatcher()$0" },
{ "trigger": "THREE.Raycaster", "contents": "THREE.Raycaster( ${1:origin}, ${2:direction}, ${3:near}, ${4:far} )$0" },
{ "trigger": "THREE.Object3D", "contents": "THREE.Object3D()$0" },
{ "trigger": "THREE.Projector", "contents": "THREE.Projector()$0" },
{ "trigger": "THREE.Face3", "contents": "THREE.Face3( ${1:a}, ${2:b}, ${3:c}, ${4:normal}, ${5:color}, ${6:materialIndex} )$0" },
{ "trigger": "THREE.Face4", "contents": "THREE.Face4( ${1:a}, ${2:b}, ${3:c}, ${4:d}, ${5:normal}, ${6:color}, ${7:materialIndex} )$0" },
{ "trigger": "THREE.Geometry", "contents": "THREE.Geometry()$0" },
{ "trigger": "THREE.BufferGeometry", "contents": "THREE.BufferGeometry()$0" },
{ "trigger": "THREE.Camera", "contents": "THREE.Camera()$0" },
{ "trigger": "THREE.OrthographicCamera", "contents": "THREE.OrthographicCamera( ${1:left}, ${2:right}, ${3:top}, ${4:bottom}, ${5:near}, ${6:far} )$0" },
{ "trigger": "THREE.PerspectiveCamera", "contents": "THREE.PerspectiveCamera( ${1:fov}, ${2:aspect}, ${3:near}, ${4:far} )$0" },
{ "trigger": "THREE.Light", "contents": "THREE.Light( ${1:hex} )$0" },
{ "trigger": "THREE.AmbientLight", "contents": "THREE.AmbientLight( ${1:hex} )$0" },
{ "trigger": "THREE.AreaLight", "contents": "THREE.AreaLight( ${1:hex}, ${2:intensity} )$0" },
{ "trigger": "THREE.DirectionalLight", "contents": "THREE.DirectionalLight( ${1:hex}, ${2:intensity} )$0" },
{ "trigger": "THREE.HemisphereLight", "contents": "THREE.HemisphereLight( ${1:skyColorHex}, ${2:groundColorHex}, ${3:intensity} )$0" },
{ "trigger": "THREE.PointLight", "contents": "THREE.PointLight( ${1:hex}, ${2:intensity}, ${3:distance} )$0" },
{ "trigger": "THREE.SpotLight", "contents": "THREE.SpotLight( ${1:hex}, ${2:intensity}, ${3:distance}, ${4:angle}, ${5:exponent} )$0" },
{ "trigger": "THREE.Loader", "contents": "THREE.Loader( ${1:showStatus} )$0" },
{ "trigger": "THREE.ImageLoader", "contents": "THREE.ImageLoader()$0" },
{ "trigger": "THREE.JSONLoader", "contents": "THREE.JSONLoader( ${1:showStatus} )$0" },
{ "trigger": "THREE.LoadingMonitor", "contents": "THREE.LoadingMonitor()$0" },
{ "trigger": "THREE.SceneLoader", "contents": "THREE.SceneLoader()$0" },
{ "trigger": "THREE.TextureLoader", "contents": "THREE.TextureLoader()$0" },
{ "trigger": "THREE.Material", "contents": "THREE.Material()$0" },
{ "trigger": "THREE.LineBasicMaterial", "contents": "THREE.LineBasicMaterial( ${1:parameters} )$0" },
{ "trigger": "THREE.LineDashedMaterial", "contents": "THREE.LineDashedMaterial( ${1:parameters} )$0" },
{ "trigger": "THREE.MeshBasicMaterial", "contents": "THREE.MeshBasicMaterial( ${1:parameters} )$0" },
{ "trigger": "THREE.MeshLambertMaterial", "contents": "THREE.MeshLambertMaterial( ${1:parameters} )$0" },
{ "trigger": "THREE.MeshPhongMaterial", "contents": "THREE.MeshPhongMaterial( ${1:parameters} )$0" },
{ "trigger": "THREE.MeshDepthMaterial", "contents": "THREE.MeshDepthMaterial( ${1:parameters} )$0" },
{ "trigger": "THREE.MeshNormalMaterial", "contents": "THREE.MeshNormalMaterial( ${1:parameters} )$0" },
{ "trigger": "THREE.MeshFaceMaterial", "contents": "THREE.MeshFaceMaterial( ${1:materials} )$0" },
{ "trigger": "THREE.ParticleBasicMaterial", "contents": "THREE.ParticleBasicMaterial( ${1:parameters} )$0" },
{ "trigger": "THREE.ParticleCanvasMaterial", "contents": "THREE.ParticleCanvasMaterial( ${1:parameters} )$0" },
{ "trigger": "THREE.ShaderMaterial", "contents": "THREE.ShaderMaterial( ${1:parameters} )$0" },
{ "trigger": "THREE.SpriteMaterial", "contents": "THREE.SpriteMaterial( ${1:parameters} )$0" },
{ "trigger": "THREE.Texture", "contents": "THREE.Texture( ${1:image}, ${2:mapping}, ${3:wrapS}, ${4:wrapT}, ${5:magFilter}, ${6:minFilter}, ${7:format}, ${8:type}, ${9:anisotropy} )$0" },
{ "trigger": "THREE.CompressedTexture", "contents": "THREE.CompressedTexture( ${1:mipmaps}, ${2:width}, ${3:height}, ${4:format}, ${5:type}, ${6:mapping}, ${7:wrapS}, ${8:wrapT}, ${9:magFilter}, ${10:minFilter}, ${11:anisotropy} )$0" },
{ "trigger": "THREE.DataTexture", "contents": "THREE.DataTexture( ${1:data}, ${2:width}, ${3:height}, ${4:format}, ${5:type}, ${6:mapping}, ${7:wrapS}, ${8:wrapT}, ${9:magFilter}, ${10:minFilter}, ${11:anisotropy} )$0" },
{ "trigger": "THREE.Particle", "contents": "THREE.Particle( ${1:material} )$0" },
{ "trigger": "THREE.ParticleSystem", "contents": "THREE.ParticleSystem( ${1:geometry}, ${2:material} )$0" },
{ "trigger": "THREE.Line", "contents": "THREE.Line( ${1:geometry}, ${2:material}, ${3:type} )$0" },
{ "trigger": "THREE.Mesh", "contents": "THREE.Mesh( ${1:geometry}, ${2:material} )$0" },
{ "trigger": "THREE.SkinnedMesh", "contents": "THREE.SkinnedMesh( ${1:geometry}, ${2:material}, ${3:useVertexTexture} )$0" },
{ "trigger": "THREE.MorphAnimMesh", "contents": "THREE.MorphAnimMesh( ${1:geometry}, ${2:material} )$0" },
{ "trigger": "THREE.Ribbon", "contents": "THREE.Ribbon( ${1:geometry}, ${2:material} )$0" },
{ "trigger": "THREE.LOD", "contents": "THREE.LOD()$0" },
{ "trigger": "THREE.Sprite", "contents": "THREE.Sprite( ${1:material} )$0" },
{ "trigger": "THREE.Scene", "contents": "THREE.Scene()$0" },
{ "trigger": "THREE.Fog", "contents": "THREE.Fog( ${1:hex}, ${2:near}, ${3:far} )$0" },
{ "trigger": "THREE.FogExp2", "contents": "THREE.FogExp2( ${1:hex}, ${2:density} )$0" },
{ "trigger": "THREE.CanvasRenderer", "contents": "THREE.CanvasRenderer( ${1:parameters} )$0" },
{ "trigger": "THREE.WebGLRenderer", "contents": "THREE.WebGLRenderer( ${1:parameters} )$0" },
{ "trigger": "THREE.WebGLRenderTarget", "contents": "THREE.WebGLRenderTarget( ${1:width}, ${2:height}, ${3:options} )$0" },
{ "trigger": "THREE.WebGLRenderTargetCube", "contents": "THREE.WebGLRenderTargetCube( ${1:width}, ${2:height}, ${3:options} )$0" },
{ "trigger": "THREE.RenderableVertex", "contents": "THREE.RenderableVertex()$0" },
{ "trigger": "THREE.RenderableFace3", "contents": "THREE.RenderableFace3()$0" },
{ "trigger": "THREE.RenderableFace4", "contents": "THREE.RenderableFace4()$0" },
{ "trigger": "THREE.RenderableObject", "contents": "THREE.RenderableObject()$0" },
{ "trigger": "THREE.RenderableParticle", "contents": "THREE.RenderableParticle()$0" },
{ "trigger": "THREE.RenderableLine", "contents": "THREE.RenderableLine()$0" },
{ "trigger": "THREE.Curve", "contents": "THREE.Curve()$0" },
{ "trigger": "THREE.CurvePath", "contents": "THREE.CurvePath()$0" },
{ "trigger": "THREE.Gyroscope", "contents": "THREE.Gyroscope()$0" },
{ "trigger": "THREE.Path", "contents": "THREE.Path( ${1:points} )$0" },
{ "trigger": "THREE.Shape", "contents": "THREE.Shape()$0" },
{ "trigger": "THREE.Animation", "contents": "THREE.Animation( ${1:root}, ${2:name}, ${3:interpolationType} )$0" },
{ "trigger": "THREE.CubeCamera", "contents": "THREE.CubeCamera( ${1:near}, ${2:far}, ${3:cubeResolution} )$0" },
{ "trigger": "THREE.CombinedCamera", "contents": "THREE.CombinedCamera( ${1:width}, ${2:height}, ${3:fov}, ${4:near}, ${5:far}, ${6:orthoNear}, ${7:orthoFar} )$0" },
{ "trigger": "THREE.AsteriskGeometry", "contents": "THREE.AsteriskGeometry( ${1:innerRadius}, ${2:outerRadius} )$0" },
{ "trigger": "THREE.CircleGeometry", "contents": "THREE.CircleGeometry( ${1:radius}, ${2:segments}, ${3:thetaStart}, ${4:thetaLength} )$0" },
{ "trigger": "THREE.CubeGeometry", "contents": "THREE.CubeGeometry( ${1:width}, ${2:height}, ${3:depth}, ${4:widthSegments}, ${5:heightSegments}, ${6:depthSegments} )$0" },
{ "trigger": "THREE.CylinderGeometry", "contents": "THREE.CylinderGeometry( ${1:radiusTop}, ${2:radiusBottom}, ${3:height}, ${4:radiusSegments}, ${5:heightSegments}, ${6:openEnded} )$0" },
{ "trigger": "THREE.ExtrudeGeometry", "contents": "THREE.ExtrudeGeometry( ${1:shapes}, ${2:options} )$0" },
{ "trigger": "THREE.ShapeGeometry", "contents": "THREE.ShapeGeometry( ${1:shapes}, ${2:options} )$0" },
{ "trigger": "THREE.LatheGeometry", "contents": "THREE.LatheGeometry( ${1:points}, ${2:segments}, ${3:phiStart}, ${4:phiLength} )$0" },
{ "trigger": "THREE.PlaneGeometry", "contents": "THREE.PlaneGeometry( ${1:width}, ${2:height}, ${3:widthSegments}, ${4:heightSegments} )$0" },
{ "trigger": "THREE.SphereGeometry", "contents": "THREE.SphereGeometry( ${1:radius}, ${2:widthSegments}, ${3:heightSegments}, ${4:phiStart}, ${5:phiLength}, ${6:thetaStart}, ${7:thetaLength} )$0" },
{ "trigger": "THREE.TextGeometry", "contents": "THREE.TextGeometry( ${1:text}, ${2:parameters} )$0" },
{ "trigger": "THREE.TorusGeometry", "contents": "THREE.TorusGeometry( ${1:radius}, ${2:tube}, ${3:radialSegments}, ${4:tubularSegments}, ${5:arc} )$0" },
{ "trigger": "THREE.TorusKnotGeometry", "contents": "THREE.TorusKnotGeometry( ${1:radius}, ${2:tube}, ${3:radialSegments}, ${4:tubularSegments}, ${5:p}, ${6:q}, ${7:heightScale} )$0" },
{ "trigger": "THREE.PolyhedronGeometry", "contents": "THREE.PolyhedronGeometry( ${1:vertices}, ${2:faces}, ${3:radius}, ${4:detail} )$0" },
{ "trigger": "THREE.IcosahedronGeometry", "contents": "THREE.IcosahedronGeometry( ${1:radius}, ${2:detail} )$0" },
{ "trigger": "THREE.OctahedronGeometry", "contents": "THREE.OctahedronGeometry( ${1:radius}, ${2:detail} )$0" },
{ "trigger": "THREE.TetrahedronGeometry", "contents": "THREE.TetrahedronGeometry( ${1:radius}, ${2:detail} )$0" },
{ "trigger": "THREE.ParametricGeometry", "contents": "THREE.ParametricGeometry( ${1:func}, ${2:slices}, ${3:stacks}, ${4:useTris} )$0" },
{ "trigger": "THREE.AxisHelper", "contents": "THREE.AxisHelper( ${1:size} )$0" },
{ "trigger": "THREE.ArrowHelper", "contents": "THREE.ArrowHelper( ${1:dir}, ${2:origin}, ${3:length}, ${4:hex} )$0" },
{ "trigger": "THREE.CameraHelper", "contents": "THREE.CameraHelper( ${1:camera} )$0" },
{ "trigger": "THREE.DirectionalLightHelper", "contents": "THREE.DirectionalLightHelper( ${1:light}, ${2:sphereSize} )$0" },
{ "trigger": "THREE.HemisphereLightHelper", "contents": "THREE.HemisphereLightHelper( ${1:light}, ${2:sphereSize}, ${3:arrowLength}, ${4:domeSize} )$0" },
{ "trigger": "THREE.PointLightHelper", "contents": "THREE.PointLightHelper( ${1:light}, ${2:sphereSize} )$0" },
{ "trigger": "THREE.SpotLightHelper", "contents": "THREE.SpotLightHelper( ${1:light}, ${2:sphereSize} )$0" },
{ "trigger": "THREE.ImmediateRenderObject", "contents": "THREE.ImmediateRenderObject()$0" },
{ "trigger": "THREE.LensFlare", "contents": "THREE.LensFlare( ${1:texture}, ${2:size}, ${3:distance}, ${4:blending}, ${5:color} )$0" },
{ "trigger": "THREE.LensFlarePlugin", "contents": "THREE.LensFlarePlugin()$0" },
{ "trigger": "THREE.ShadowMapPlugin", "contents": "THREE.ShadowMapPlugin()$0" },
{ "trigger": "THREE.SpritePlugin", "contents": "THREE.SpritePlugin()$0" },
{ "trigger": "THREE.DepthPassPlugin", "contents": "THREE.DepthPassPlugin()$0" },
"THREE"
]
}
\ No newline at end of file
utils/sublime.py
0 → 100644
浏览文件 @
f08e10b0
#!/usr/bin/env python
import
sys
if
sys
.
version_info
<
(
2
,
7
):
print
(
"This script requires at least Python 2.7."
)
print
(
"Please, update to a newer version: http://www.python.org/download/releases/"
)
exit
()
import
argparse
import
json
import
os
import
re
import
shutil
import
tempfile
def
main
(
argv
=
None
):
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
'--include'
,
action
=
'append'
,
required
=
True
)
parser
.
add_argument
(
'--output'
,
default
=
'editors/sublimetext2/threejs.sublime-completions'
)
args
=
parser
.
parse_args
()
output
=
args
.
output
# parsing
print
(
' * Generating '
+
output
)
fd
,
path
=
tempfile
.
mkstemp
()
tmp
=
open
(
path
,
'w'
)
tmp
.
write
(
'{
\n\t
"scope": "source.js,source.js.embedded.html,source.coffee",
\n\t
"version": "r55",
\n\t
"completions":
\n\t
[
\n
'
)
for
include
in
args
.
include
:
with
open
(
'includes/'
+
include
+
'.json'
,
'r'
)
as
f
:
files
=
json
.
load
(
f
)
for
filename
in
files
:
with
open
(
filename
,
'r'
)
as
f
:
string
=
f
.
read
()
match
=
re
.
search
(
'THREE.(\w+)[\ ]+?=[\ ]+?function[\ ]+\(([\w\,\ ]+)?\)'
,
string
)
if
match
:
name
=
match
.
group
(
1
)
parameters
=
match
.
group
(
2
)
if
parameters
is
None
:
parameters
=
''
else
:
array
=
parameters
.
split
(
','
)
for
i
in
range
(
len
(
array
)):
array
[
i
]
=
'${'
+
str
(
i
+
1
)
+
':'
+
array
[
i
].
strip
()
+
'}'
# ${1:param}
parameters
=
' '
+
', '
.
join
(
array
)
+
' '
tmp
.
write
(
'
\t\t
{ "trigger": "THREE.'
+
name
+
'", "contents": "THREE.'
+
name
+
'('
+
parameters
+
')$0" },
\n
'
)
tmp
.
write
(
"
\t\t\"
THREE
\"\n\t
]
\n
}"
)
tmp
.
close
()
# save
shutil
.
copy
(
path
,
output
)
os
.
chmod
(
output
,
0o664
);
# temp files would usually get 0600
if
__name__
==
"__main__"
:
main
()
utils/sublime.sh
0 → 100755
浏览文件 @
f08e10b0
#!/bin/sh
python sublime.py
--include
common
--include
extras
--output
editors/sublimetext2/threejs.sublime-completions
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录