Skip to content

Commit 0eac074

Browse files
committed
Merge branch 'dev' into add-typescript-for-jsm
2 parents aa219bc + 983a702 commit 0eac074

38 files changed

+3192
-1700
lines changed

build/three.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20215,7 +20215,7 @@
2021520215

2021620216
console.warn( 'THREE.WebGLRenderer: Texture has been resized from (' + image.width + 'x' + image.height + ') to (' + width + 'x' + height + ').' );
2021720217

20218-
return useOffscreenCanvas ? canvas.transferToImageBitmap() : canvas;
20218+
return canvas;
2021920219

2022020220
} else {
2022120221

@@ -34668,7 +34668,7 @@
3466834668

3466934669
},
3467034670

34671-
parse: function ( json, onLoad ) {
34671+
parse: function ( json ) {
3467234672

3467334673
var animations = [];
3467434674

@@ -34680,7 +34680,7 @@
3468034680

3468134681
}
3468234682

34683-
onLoad( animations );
34683+
return animations;
3468434684

3468534685
},
3468634686

build/three.min.js

Lines changed: 109 additions & 109 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

build/three.module.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20209,7 +20209,7 @@ function WebGLTextures( _gl, extensions, state, properties, capabilities, utils,
2020920209

2021020210
console.warn( 'THREE.WebGLRenderer: Texture has been resized from (' + image.width + 'x' + image.height + ') to (' + width + 'x' + height + ').' );
2021120211

20212-
return useOffscreenCanvas ? canvas.transferToImageBitmap() : canvas;
20212+
return canvas;
2021320213

2021420214
} else {
2021520215

@@ -34662,7 +34662,7 @@ Object.assign( AnimationLoader.prototype, {
3466234662

3466334663
},
3466434664

34665-
parse: function ( json, onLoad ) {
34665+
parse: function ( json ) {
3466634666

3466734667
var animations = [];
3466834668

@@ -34674,7 +34674,7 @@ Object.assign( AnimationLoader.prototype, {
3467434674

3467534675
}
3467634676

34677-
onLoad( animations );
34677+
return animations;
3467834678

3467934679
},
3468034680

docs/api/en/loaders/AnimationLoader.html

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -65,19 +65,18 @@ <h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Func
6565
<p>
6666
[page:String url] — the path or URL to the file. This can also be a
6767
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
68-
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:Animation animation].<br />
68+
[page:Function onLoad] — Will be called when load completes. The argument will be the loaded [page:AnimationClip animation clips].<br />
6969
[page:Function onProgress] — Will be called while load progresses. The argument will be the XMLHttpRequest instance, which contains .[page:Integer total] and .[page:Integer loaded] bytes.<br />
7070
[page:Function onError] — Will be called if load errors.<br /><br />
7171

7272
Begin loading from url and pass the loaded animation to onLoad.
7373
</p>
7474

75-
<h3>[method:null parse]( [param:JSON json], [param:Function onLoad] )</h3>
75+
<h3>[method:Array parse]( [param:JSON json] )</h3>
7676
<p>
77-
[page:JSON json] — required<br />
78-
[page:Function onLoad] — Will be called when parsing completes. <br /><br />
77+
[page:JSON json] — required<br /><br />
7978

80-
Parse the JSON object and pass the result to onLoad. Individual clips in the object will
79+
Parse the JSON object and return an array of animation clips. Individual clips in the object will
8180
be parsed with [page:AnimationClip.parse].
8281
</p>
8382

docs/api/en/loaders/ImageBitmapLoader.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ <h1>[name]</h1>
1616
Unlike [page:FileLoader], [name] does not avoid multiple concurrent requests to the same URL.
1717
</p>
1818

19+
<p>
20+
Note that [page:Texture.flipY] and [page:Texture.premultiplyAlpha] with [link:https://developer.mozilla.org/de/docs/Web/API/ImageBitmap ImageBitmap] are ignored.
21+
[link:https://developer.mozilla.org/de/docs/Web/API/ImageBitmap ImageBitmap] needs these configuration on bitmap creation
22+
unlike regular images need them on uploading to GPU. You need to set the equivalent options via [page:ImageBitmapLoader.setOptions]
23+
instead. Refer to [link:https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.10 WebGL specification] for the detail.
24+
</p>
25+
1926
<h2>Example</h2>
2027

2128
<p>
@@ -26,6 +33,9 @@ <h2>Example</h2>
2633
// instantiate a loader
2734
var loader = new THREE.ImageBitmapLoader();
2835

36+
// set options if needed
37+
loader.setOptions( { imageOrientation: 'flipY' } );
38+
2939
// load a image resource
3040
loader.load(
3141
// resource URL

docs/api/en/loaders/ImageLoader.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ <h1>[name]</h1>
1212

1313
<p class="desc">
1414
A loader for loading an [page:Image].
15-
This uses the [page:FileLoader] internally for loading files, and is used internally by the
15+
This is used internally by the
1616
[page:CubeTextureLoader], [page:ObjectLoader] and [page:TextureLoader].
1717
</p>
1818

docs/api/zh/loaders/AnimationLoader.html

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -65,20 +65,17 @@ <h3>[method:null load]( [param:String url], [param:Function onLoad], [param:Func
6565
<p>
6666
[page:String url] — 文件的URL或者路径,也可以为
6767
[link:https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/Data_URIs Data URI].<br />
68-
[page:Function onLoad] — 加载完成时将调用。回调参数为将要加载的[page:Animation animation].<br />
68+
[page:Function onLoad] — 加载完成时将调用。回调参数为将要加载的[page:AnimationClip animation clips].<br />
6969
[page:Function onProgress] — 将在加载过程中进行调用。参数为XMLHttpRequest实例,实例包含[page:Integer total]和[page:Integer loaded]字节。<br />
7070
[page:Function onError] — 在加载错误时被调用。<br /><br />
7171

7272
从URL中进行加载并将动画传递给onLoad。
7373
</p>
7474

75-
<h3>[method:null parse]( [param:JSON json], [param:Function onLoad] )</h3>
75+
<h3>[method:Array parse]( [param:JSON json] )</h3>
7676
<p>
77-
[page:JSON json] — 请求<br />
78-
[page:Function onLoad] — 当解析完成时,将被调用 <br /><br />
79-
80-
解析JSON对象并将结果传递给onLoad。对象中的单个片段将
81-
用[page [page:AnimationClip.parse]进行解析。
77+
[page:JSON json] — 请求 <br /><br />
78+
TODO
8279
</p>
8380

8481
<h2></h2>

docs/api/zh/loaders/ImageBitmapLoader.html

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,13 @@ <h1>[name]</h1>
1616
不像[page:FileLoader], [name]无需避免对同一的URL进行多次请求。
1717
</p>
1818

19+
<p>
20+
Note that [page:Texture.flipY] and [page:Texture.premultiplyAlpha] with [link:https://developer.mozilla.org/de/docs/Web/API/ImageBitmap ImageBitmap] are ignored.
21+
[link:https://developer.mozilla.org/de/docs/Web/API/ImageBitmap ImageBitmap] needs these configuration on bitmap creation
22+
unlike regular images need them on uploading to GPU. You need to set the equivalent options via [page:ImageBitmapLoader.setOptions]
23+
instead. Refer to [link:https://www.khronos.org/registry/webgl/specs/latest/1.0/#6.10 WebGL specification] for the detail.
24+
</p>
25+
1926
<h2>例子</h2>
2027

2128
<p>
@@ -26,6 +33,9 @@ <h2>例子</h2>
2633
// 初始化一个加载器
2734
var loader = new THREE.ImageBitmapLoader();
2835

36+
// set options if needed
37+
loader.setOptions( { imageOrientation: 'flipY' } );
38+
2939
// 加载一个图片资源
3040
loader.load(
3141
// 资源的URL

docs/examples/loaders/GLTFLoader.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,9 @@ <h2>Example</h2>
5858
// Optional: Provide a DRACOLoader instance to decode compressed mesh data
5959
THREE.DRACOLoader.setDecoderPath( '/examples/js/libs/draco' );
6060
loader.setDRACOLoader( new THREE.DRACOLoader() );
61+
62+
// Optional: Pre-fetch Draco WASM/JS module, to save time while parsing.
63+
THREE.DRACOLoader.getDecoderModule();
6164

6265
// Load a glTF resource
6366
loader.load(

editor/css/dark.css

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -250,3 +250,51 @@ select {
250250
.Outliner .option.active {
251251
background-color: rgba(21,60,94,1);
252252
}
253+
254+
/* */
255+
256+
@media all and ( max-width: 600px ) {
257+
258+
#menubar .menu .options {
259+
max-height: calc(100% - 372px);
260+
}
261+
262+
#menubar .menu.right {
263+
display: none;
264+
}
265+
266+
#viewport {
267+
left: 0;
268+
right: 0;
269+
top: 32px;
270+
height: calc(100% - 352px);
271+
}
272+
273+
#script {
274+
left: 0;
275+
right: 0;
276+
top: 32px;
277+
height: calc(100% - 352px);
278+
}
279+
280+
#player {
281+
left: 0;
282+
right: 0;
283+
top: 32px;
284+
height: calc(100% - 352px);
285+
}
286+
287+
#sidebar {
288+
left: 0;
289+
width: 100%;
290+
top: calc(100% - 320px);
291+
bottom: 0;
292+
}
293+
294+
#toolbar {
295+
left: calc(50% - 140px);
296+
width: 280px;
297+
top: 52px;
298+
}
299+
300+
}

0 commit comments

Comments
 (0)