-
Notifications
You must be signed in to change notification settings - Fork 25
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(editor): pass run test: when close Modal, show cube1 anim
create ui in index.html in publish action; operate ui in script;
- Loading branch information
Showing
32 changed files
with
770 additions
and
308 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
123 changes: 2 additions & 121 deletions
123
contributes/meta3d-action-publish/publish/index.html
100755 → 100644
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,126 +1,7 @@ | ||
<!DOCTYPE html> | ||
<html> | ||
|
||
<head> | ||
<meta charset="UTF-8" /> | ||
<title>Meta3D</title> | ||
|
||
<style> | ||
#loading { | ||
<!doctype html><html><head><meta charset="UTF-8"/><title>Meta3D</title><style>#loading { | ||
display: block; | ||
/* color: #e7981f; */ | ||
/* margin-top: 10px; */ | ||
font-size: 85px; | ||
font-weight: bold; | ||
} | ||
</style> | ||
</head> | ||
|
||
<body> | ||
<section> | ||
<span id="loading"> | ||
<!-- TODO use logo + loading gif --> | ||
loading... | ||
</span> | ||
</section> | ||
|
||
<!-- TODO full screen --> | ||
<canvas id="canvas" width=800 height=800></canvas> | ||
|
||
<script src="./meta3d.js"></script> | ||
|
||
<script> | ||
window.onload = () => { | ||
let _removeLoadingUI = () => { | ||
document.querySelector("#loading").remove() | ||
} | ||
|
||
let _loop = ( | ||
[ | ||
|
||
update, render, | ||
], | ||
meta3dState, | ||
) => { | ||
return update(meta3dState).then((meta3dState) => { | ||
render(meta3dState).then((meta3dState) => { | ||
requestAnimationFrame(() => { | ||
_loop( | ||
[ | ||
update, render, | ||
], | ||
meta3dState | ||
) | ||
}) | ||
}) | ||
}) | ||
} | ||
|
||
let _main = () => { | ||
let isDebug = true | ||
|
||
let float9Array1 = new Float32Array(9) | ||
let float32Array1 = new Float32Array(32) | ||
let transformCount = 100000 | ||
let geometryCount = 100000 | ||
let geometryPointCount = 10000000 | ||
let pbrMaterialCount = 100000 | ||
|
||
let canvas = document.querySelector("#canvas") | ||
|
||
fetch("./Engine.arraybuffer") | ||
.then(response => response.arrayBuffer()) | ||
.then(enginePackageBinaryFile => { | ||
return fetch("./Scene.glb") | ||
.then(response => response.arrayBuffer()) | ||
.then(sceneGlb => { | ||
_removeLoadingUI() | ||
|
||
return [enginePackageBinaryFile, sceneGlb] | ||
}) | ||
}) | ||
.then(([enginePackageBinaryFile, sceneGlb]) => { | ||
let [meta3dState, _, entryExtensionProtocolName] = Meta3d.loadPackage(enginePackageBinaryFile) | ||
|
||
if (entryExtensionProtocolName !== "meta3d-engine-whole-protocol") { | ||
throw new Error( | ||
`entryExtensionProtocolName: ${entryExtensionProtocolName} should be meta3d-engine-whole-protocol` | ||
) | ||
} | ||
|
||
|
||
let { loadScene, prepare, init, update, render, scene } = Meta3d.getExtensionService(meta3dState, entryExtensionProtocolName) | ||
|
||
meta3dState = prepare( | ||
meta3dState, | ||
isDebug, | ||
{ | ||
float9Array1, | ||
float32Array1, | ||
transformCount, | ||
geometryCount, | ||
geometryPointCount, | ||
pbrMaterialCount | ||
} | ||
) | ||
|
||
return loadScene(meta3dState, sceneGlb).then(meta3dState => { | ||
return init(meta3dState, canvas).then(meta3dState => { | ||
console.log("init success", meta3dState) | ||
|
||
_loop([update, render], meta3dState) | ||
}) | ||
}) | ||
}) | ||
.catch(error => { | ||
console.error(error) | ||
}) | ||
} | ||
|
||
_main() | ||
} | ||
</script> | ||
</body> | ||
|
||
|
||
</html> | ||
}</style><script defer="defer" src="static/js/main.js"></script></head><body><section><span id="loading">loading...</span></section><canvas id="canvas" width="800" height="800"></canvas><div id="root"></div></body></html> |
This file was deleted.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
103 changes: 103 additions & 0 deletions
103
contributes/meta3d-action-publish/publish/static/js/main.js.LICENSE.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,103 @@ | ||
/* | ||
object-assign | ||
(c) Sindre Sorhus | ||
@license MIT | ||
*/ | ||
|
||
/*! | ||
Copyright (c) 2018 Jed Watson. | ||
Licensed under the MIT License (MIT), see | ||
http://jedwatson.github.io/classnames | ||
*/ | ||
|
||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. | ||
|
||
Permission to use, copy, modify, and/or distribute this software for any | ||
purpose with or without fee is hereby granted. | ||
|
||
THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH | ||
REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY | ||
AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT, | ||
INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM | ||
LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR | ||
OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR | ||
PERFORMANCE OF THIS SOFTWARE. | ||
***************************************************************************** */ | ||
|
||
/*! ***************************************************************************** | ||
Copyright (c) Microsoft Corporation. All rights reserved. | ||
Licensed under the Apache License, Version 2.0 (the "License"); you may not use | ||
this file except in compliance with the License. You may obtain a copy of the | ||
License at http://www.apache.org/licenses/LICENSE-2.0 | ||
|
||
THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY | ||
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED | ||
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE, | ||
MERCHANTABLITY OR NON-INFRINGEMENT. | ||
|
||
See the Apache Version 2.0 License for specific language governing permissions | ||
and limitations under the License. | ||
***************************************************************************** */ | ||
|
||
/*! ieee754. BSD-3-Clause License. Feross Aboukhadijeh <https://feross.org/opensource> */ | ||
|
||
/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */ | ||
|
||
/** | ||
* @license React | ||
* react-is.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
/** | ||
* @license qrcode.react | ||
* Copyright (c) Paul O'Shannessy | ||
* SPDX-License-Identifier: ISC | ||
*/ | ||
|
||
/** @license MIT License (c) copyright 2010-2014 original author or authors */ | ||
|
||
/** @license MIT License (c) copyright 2010-2016 original author or authors */ | ||
|
||
/** @license MIT License (c) copyright 2010-2017 original author or authors */ | ||
|
||
/** @license React v0.20.2 | ||
* scheduler.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
/** @license React v16.13.1 | ||
* react-is.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
/** @license React v17.0.2 | ||
* react-dom.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ | ||
|
||
/** @license React v17.0.2 | ||
* react.production.min.js | ||
* | ||
* Copyright (c) Facebook, Inc. and its affiliates. | ||
* | ||
* This source code is licensed under the MIT license found in the | ||
* LICENSE file in the root directory of this source tree. | ||
*/ |
1 change: 1 addition & 0 deletions
1
contributes/meta3d-action-publish/publish/static/js/main.js.map
Large diffs are not rendered by default.
Oops, something went wrong.
22 changes: 1 addition & 21 deletions
22
contributes/meta3d-action-publish/publish/three/basis/basis_transcoder.js
100755 → 100644
Large diffs are not rendered by default.
Oops, something went wrong.
34 changes: 1 addition & 33 deletions
34
contributes/meta3d-action-publish/publish/three/draco/gltf/draco_decoder.js
100755 → 100644
Large diffs are not rendered by default.
Oops, something went wrong.
34 changes: 1 addition & 33 deletions
34
contributes/meta3d-action-publish/publish/three/draco/gltf/draco_encoder.js
100755 → 100644
Large diffs are not rendered by default.
Oops, something went wrong.
Oops, something went wrong.