Commit Graph

67 Commits

Author SHA1 Message Date
PP b1123f4546 fix accelerometer && system info on native platform (#8564)
* fix platform info in native platform

* fix orientation on native platform
2021-04-27 10:11:25 +08:00
PP cd1548d3f6 fix Audio bug (#8515)
* support AudioPlayer.loadOneShotAudio

* support native

* support minigame

* support createInnerAudioContextPolyfill

update

* fix audioLoading on runtime

* fix Safari doesn't support promise based decodeAudioData

* optimize interface design

* add onPlay polyfill for vivo

* fix setting AudioSource.clip concurrently

* add createInnerAudioContextPolyfill for Xiaomi

* add createInnerAudioContextPolyfill on Baidu

* fix web audio player currentTime
2021-04-23 18:07:58 +08:00
PP cf554645f0 fix touch event on alipay (#8507)
update
2021-04-20 19:54:31 +08:00
PP 86f20da0f0 support pal/input (#8472)
* support pal/input

update

* update

* fix esLint

* support minigame

* support  pal/input on  minigame

* remove minigame.isSubContext

* support native

update

* deprecate static property on EventMouse

* deprecated static property in  EventTouch

* remove TODO

* remove  x y position in MouseWheel Event

* remove TODO

* remove temp code

* fix esLint

* update AccelerometerIntervalMode

* remove legacy code in JSB

* fix esLint

* optimize AccelerometerInputSource.setInterval

* fix esLint

* optimize code

* add more details for documentation

* update

* don't pass game.canvas to inputManager.registerSystemEvent

* optimize

* Revert "remove  x y position in MouseWheel Event"

This reverts commit b521ec4948d693b420887cdeb2f5f3afc1500066.

# Conflicts:
#	@types/pal/input.d.ts

* update

* fix esLint

* fix esLint
2021-04-19 16:24:42 +08:00
PP 9bb4c4f8ea support pal/system (#8441)
* support pal/app

update

update

* remove 'QQ_PLAY' and 'FB_PLAYABLE_ADS'

* rename system

update

* rename Language

* update

* update

* bind function in Game.ts

* rename system

* support system.getBatteryLevel()

* support pal/system on native

* support pal/system on minigame

* update

* fix esLint

* fix Circular dependency

* fix esLint

* use math/Size
2021-04-15 11:00:54 +08:00
Leslie Leigh (李的序) 2987cecd9a Optimize the document on pal/audio (#8402)
* Optimize the document on pal/audio

* Update @types/pal/audio.d.ts

Co-authored-by: PP <chinese1236@qq.com>

* Update @types/pal/audio.d.ts

Co-authored-by: PP <chinese1236@qq.com>

* Update @types/pal/audio.d.ts

Co-authored-by: PP <chinese1236@qq.com>

Co-authored-by: PP <chinese1236@qq.com>
Co-authored-by: Santy-Wang <wh19930829@qq.com>
2021-04-14 13:55:18 +08:00
PP 831722c121 optimize pal (#8405)
* rename mg

* optimize audioMgr

* remove implement class

update

* add src property for AudioPlayer

* fix multiple audioSource reference the same audioClip

* support operation-queue

update

* fix operation deadlock

* update

* fix esLint

update

update

* remove ensureStop

remove stop in play

* fix audio-dom loading

* optimize operation queue in AudioSource component

* HACK on runtime

* fix esLint

* update esLint

* HACK on WeChat DevTools

* lowercase enqueueOperationDecorator

* remve ! with @ts-expect-error

* Revert "HACK on WeChat DevTools"

This reverts commit 230a2ec9223f21fc34e8435b962c0b41c18d4e91.

* fix esLint

* rename clip.ts to audio-clip.ts

* add audio meta

* use fastRemoveAt

* change ClassDecorator to MethodDecorator

* remove  player reference in audio-clip

* destroy temporary AudioPlayer after loading

* optimize syncPlayer

* fix esLint

* fix esLint

* optimize audio-manager

* optimize operation-queue

update

* fix eslint
2021-04-09 15:21:11 +08:00
PP cd7e644694 implement audio on pal (#8255)
* Update logo in README

* add pal/audio

* deprecate property

* support wechat  game AudioPlayer

* unify minigame interface

* optimize module name

* support  native audio

# Conflicts:
#	@types/jsb.d.ts

* add runtime platform

* fix module

* support build native virtual module

update

update

* update module name

* remove jsb-audio.js

* revert @rollup/plugin-alias

* add quickCompiler field in cc.config.json

* fix audio can't stop when paused

* fix esLint & ci

* fix ci

update

* update ccConfigJson

* add NOTE

* readonly maxAudioChannel

* add description for interface OneShotAudio

* volume range

* range for seeking

* loadNative return Promise<unknown>

* remove quickCompile field in cc.config.json

Co-authored-by: pandamicro <lphuabin@gmail.com>
Co-authored-by: Jare Guo <jareguo@users.noreply.github.com>
2021-03-25 14:30:13 +08:00
PP 6ee318daf4 revert youku platform (#8226)
* Revert "update package-lock (#8200)"

This reverts commit 5e5c3a579e.

* Revert "update build-engine version (#8195)"

This reverts commit ab36cecec0.

* Revert "update YOUKU sys info && engine building workflow (#8191)"

This reverts commit 255944f36c.

* update build-engine version

* edit publish branch

* udpate deps
2021-01-28 13:07:29 +08:00
PP 46de2a4d6a add jsb declaration (#8218) 2021-01-27 18:33:42 +08:00
PP 255944f36c update YOUKU sys info && engine building workflow (#8191)
* update YOUKU constant

* update sys info for YOUKU

* fix ts Lint

* fix lint
2021-01-23 17:14:45 +08:00
Leslie Leigh (李的序) 21826607b1 Fix lint errors (#8029)
* Fix lint errors

* Update

* Sync https://github.com/cocos-creator/engine/pull/2433

* Typo
2021-01-05 17:30:40 +08:00
Leslie Leigh (李的序) a069eeca2f Optimize shader sources build (#7998)
* Optimize shader sources build

* Linting

* HTML5, WeChat branch

* Comment
2020-12-23 16:29:58 +08:00
Santy-Wang 3be28fb3ce Revert "Optimize build time constants implementation (#7882)" (#7927)
This reverts commit 6f57c3ad8f.
2020-12-07 13:32:50 +08:00
Leslie Leigh (李的序) 6f57c3ad8f Optimize build time constants implementation (#7882) 2020-12-04 15:06:54 +08:00
Leslie Leigh (李的序) 16cc7569eb Introduce the EXPORT_TO_GLOBAL (#7820)
* Introduce the `EXPORT_TO_GLOBAL`

* Bump version
2020-11-19 15:54:33 +08:00
PP a598a9f0cf support linksure and QTT platform (#7800)
* fix undefined toDataURL on linksure platform

* update platform

* add platform info
2020-11-18 20:20:38 +08:00
Yun Hsiao Wu 32598c25cb switch to eslint (#7727)
* switch to eslint

* eslint: extends airbnb
2020-11-09 10:19:12 +08:00
Jare Guo 0319477911 fix decorator warning of ValueTypes (#7553)
* fix decorator warning of ValueTypes (sync #6285)

* refresh copyright
2020-10-21 16:31:41 +08:00
PP 73be65cd31 support new SubContextView (#7303)
* support new SubContextView

* update

* add type property when postMessage
2020-10-08 23:57:03 +08:00
PP cd03651bc4 remove jsb module declaration in engine repo (#7143)
* remove jsb module declaration in engine repo

* ignore jsb check

* space
2020-08-21 18:50:28 +08:00
pandamicro 3b66332823 Merge remote-tracking branch 'origin/3d-v1.1.1' into 3d-v1.2
# Conflicts:
#	cocos/core/3d/builtin/effects.ts
#	cocos/core/animation/animation-state.ts
#	cocos/core/game.ts
#	cocos/core/gfx/webgl/webgl-commands.ts
#	cocos/core/pipeline/instanced-buffer.ts
#	cocos/core/pipeline/render-instanced-queue.ts
#	cocos/core/platform/event-manager/input-manager.ts
#	cocos/core/platform/view.ts
#	cocos/core/renderer/core/pass.ts
#	cocos/core/renderer/scene/planar-shadows.ts
#	cocos/core/splash-screen-webgl.ts
#	cocos/core/utils/profiler/profiler.ts
#	cocos/particle/renderer/trail.ts
#	cocos/terrain/terrain.ts
#	package-lock.json
#	package.json
#	predefine.ts
#	scripts/build-engine/package-lock.json
#	scripts/build-engine/package.json
#	scripts/build-engine/src/index.ts
2020-08-12 15:53:52 +08:00
Yun Hsiao Wu afeb83e9a6 native pools (#7028) 2020-08-04 14:14:56 +08:00
jiaxin.lai 65b0478c69 v1.2 new physics features (#7037)
* 3d v1.1.1-exp physics expriment (#6787)

* activate when not awake (#6781)

* activate when not awake

* cannon too

* off event listener when onDestroy

* add clearVelocity & clearForces

* add CC_CONFIG to ammo\cannon

* add convex mesh & reuse mesh

* cache enable false by default

* terrain collider

* cone collider

* fix scale of ammo box & sphere

* simple collider

* add worldBounds & boundingSphere to collider

* add clear*** to rigid body

* enhance physics material

* enhance event

* plane collider

* stash

* tweaks

* update @cocos/ammo to v1.0.7-beta.1

* typing

* enchance update shape dynamic

* absolute scale cannon-box

* expose allowsleep

* fix warning of generate declaration

* remove physics_builtin

* DO NOT MERGE

* Better reuse

* Correct construct and deconstruct

* avoid ammo memory leaks

* minor refactor contact data

* fix cannon terrain tileSize

* stash

* optimize auto wakeup

* [Ammo] fix update by re add

* 400~

* overwrite ArrayCollisionMatrix.prototype.reset

* Export enum by namespace

* stash

* fix remove child shape of btCompound

* fix event with CCD

* dynamic instantiate

* STASH

* add group to rigid body

* update attachedRigidBody of collider in editor

* stash physics config

* tweaks of ammo config

* stash

* stash

* collision matrix

* stash

* rename deltaTime to fixedTimeStep

* group mask collider

* allow get mask

* set default group to Layers.Enum.DEFAULT

* add group change fallback

* cannon collision matrix

* fix

* update @cocos/ammo to 1.0.7-beta.2

* more prop

* fix

* disable on 1.1.1-exp

* tweaks

* fix circular dependency

* tweaks

* rename simple to simplex

* rename collider -> colliders

* stash

* ammo p2p

* hinge constraint

* adapt cannon p2p pivotB

* ammo p2p setPivotB

* constraint

* tweaks

* remove macro of physics

* refactor physics selector

* import ammo from ammo-instantiated

* update @cocos/ammo

* update @cocos/cannon
2020-08-03 11:00:07 +08:00
Leslie Leigh (李的序) aeced26917 Solve duplicated menu issue (#6973) 2020-08-02 14:53:31 +08:00
Leslie Leigh (李的序) 59c46c66af Add platform macro for ByteDance (#6982) 2020-07-15 11:37:47 +08:00
PP aaf542be76 remove browserType for minigame (#6970)
* remove browserType for wechatgame

* optimize booting in subContext

update
2020-07-12 22:42:52 +08:00
ChiaNing 1c54beb91a sys browser type add (#6939)
* sys browser type add

* change JSB
2020-07-06 11:31:46 +08:00
Yun Hsiao Wu 69db70a910 Merge remote-tracking branch 'origin/3d' into 3d 2020-06-03 16:22:00 +08:00
SijieWang a9f3969245 Merge remote-tracking branch 'cocos-for-editor/3d-v1.1.1' into 3d
# Conflicts:
#	cocos/audio/assets/clip.ts
#	cocos/core/3d/builtin/effects.ts
#	cocos/core/3d/framework/batched-skinning-model-component.ts
#	cocos/core/3d/framework/editor-camera-component.ts
#	cocos/core/3d/framework/index.ts
#	cocos/core/3d/framework/model-component.ts
#	cocos/core/animation/animation-clip.ts
#	cocos/core/animation/animation-manager.ts
#	cocos/core/animation/animation-state.ts
#	cocos/core/animation/skeletal-animation-component.ts
#	cocos/core/animation/skeletal-animation-state.ts
#	cocos/core/assets/mesh.ts
#	cocos/core/assets/simple-texture.ts
#	cocos/core/assets/sprite-frame.ts
#	cocos/core/assets/texture-base.ts
#	cocos/core/data/class-decorator.ts
#	cocos/core/data/instantiate.ts
#	cocos/core/event/event-target.ts
#	cocos/core/game.ts
#	cocos/core/load-pipeline/CCLoader.ts
#	cocos/core/load-pipeline/plist-parser.ts
#	cocos/core/load-pipeline/unpackers.ts
#	cocos/core/load-pipeline/url.ts
#	cocos/core/math/deprecated.ts
#	cocos/core/renderer/scene/model.ts
#	cocos/core/scene-graph/base-node.ts
#	cocos/core/scene-graph/scene-globals.ts
#	cocos/terrain/terrain.ts
#	predefine.ts
2020-06-03 13:25:42 +08:00
Yun Hsiao Wu 69c88434a4 Merge branch '3d-gfx' into 3d 2020-06-02 17:59:07 +08:00
Leslie Leigh (李的序) 2c1ef7941f Improve typing (#6751) 2020-05-27 11:03:56 +08:00
Leslie Leigh (李的序) 5e2adea787 Rename internal usages of global variable 'cc' into 'legacyGlobalExpo… (#6680)
* Rename internal usages of global variable 'cc' into 'legacyGlobalExports'

* Fix CI

* Rename 'legacyGlobalExports' -> 'legacyCC'
2020-05-14 15:46:45 +08:00
coulsonwang 4f74962048 fix crash issue (#6449)
* fix crash issue

* update reivew

* simplify code

* fix tsc error
2020-03-31 15:10:53 +08:00
Yun Hsiao Wu 45d182308b GPU instancing support (#6300)
* instancing works

* misc opts

* material.setproperty typing

* baked skinning model instancing works

* fix isNormalized

* custom chunk rules injection framework

* profiler instance count

* seperate custom joint textures

* fix joint mapped buffers

* WebGL 1 doesn't allow int attributes

* should rebuild instances after pso change

* set instance attribute

* constants naming
2020-03-12 10:21:19 +08:00
Leslie Leigh (李的序) 284aa38d25 Build time constants (#6256)
* consts

* Bump @cocos/build-engine version

* Fix

* Upload @cocos/build-engine

* Rm scripts/build-engine/.gitignore
2020-03-11 14:05:22 +08:00
SijieWang dff521ab43 Replace Editor variable (#6189)
* Replace Editor variable

* Fixed several definition errors
2020-02-19 15:09:53 +08:00
jiaxin.lai 87c6b9bda4 Ammo-Wrapper (#5954)
* basic physics abstract spec

* spec tweaks

* stash

* cannon refactor

* builtin refactor

* cannon wrapper & framework tweaks

* hiding, wait for 1.0.3

* delete unneed code

* export CANNON

* rebase

* rename stash

* rename I-rigid-body to i-rigid-body

* stash

* stash

* cannon refactor

* cannon wrapper & framework tweaks

* remve unneeded code

* wrap,....hack

* demo impl

* stash

* stash, complete dynamics update

* dynamic update center

* stash, size + center

* tweaks, fix share trigger shape

* tweaks

* stash

* ammo events stash

* tweaks

* stash

* complete ammo events

* tweaks

* stash

* body property, stash

* body , stash...

* tweaks

* tweaks

* tweaks

* ammo tweaks

* stash

* stash

* tweaks

* tweaks

* stash,complete tirgger,body、 ghost etc.

* tweaks

* remove unneeded code

* fix api of angluar velocity

* physic material for single body for now

* ray test stash

* stash

* update ammo version

* impl raycast

* impl group mask

* update ammo version

* update ammo package

* add onDestroy to ammo rigid body

* add protected for temporary

* fix allow sleep

* remove unneed code

* shape tweaks

* stash

* rename spahe to shape

* tweaks

* fix damping

* adapt

* reset state after disable & enable

* export ammo.js

* Revert "cannon wrapper & framework tweaks"

This reverts commit e59ea98c0bd8c23b23e9ee428ddce45d0271f1eb.

* update @cocos/ammo version

* fix applyLocalTorque

* tweaks

* beta version

* fix import i-rigid-body

* delete unused file

* Specification function name
2019-12-25 17:34:12 +08:00
ChiaNing b6985161fa add cocosplay for build (#5959) 2019-12-25 11:11:13 +08:00
Lelie Leight (李的序) 62a3ed7b2b Scripting 2.0-Part 1 (#5781)
* Scripting 2.0-Part 1

* Bump typescript to 3.7.2

* use event for EditorExtends

* update
2019-12-11 17:39:47 +08:00
pandamicro 802d7a9b49 Merge branch '3d-v1.0.2' into 3d
# Conflicts:
#	cocos/core/components/ui-base/canvas-component.ts
#	cocos/core/components/ui-base/ui-render-component.ts
#	cocos/core/game.ts
#	cocos/core/pipeline/forward/forward-pipeline.ts
#	cocos/core/pipeline/render-flow.ts
#	cocos/core/pipeline/render-pipeline.ts
#	cocos/core/root.ts
#	cocos/core/scene-graph/base-node.ts
2019-12-03 19:23:26 +08:00
ChiaNing f3c198171e alipay adapter update (#5824)
* alipay adapter update

* platform change

* update

* useless remove
2019-12-03 15:47:23 +08:00
zheng han c761b408dc add editorExtends for node and component (#5659)
* add editorExtends for node and component

* remove CC_TEST
2019-11-01 10:43:18 +08:00
Lelie Leight (李的序) a722483d2d fix typing errors (#5538)
* fix typing errors

* disable eslint rule: prefer-readonly
2019-10-14 22:58:15 +08:00
jiaxin.lai 3fdda0d1c8 Rename built_in to builtin (#5390)
* rename ***_BUILT_IN to ***_BUILTIN

* add protection, it will be remove when editor repo ***_BUILT_IN rename to ***_BUILTIN
2019-09-16 10:50:05 +08:00
Yun Hsiao Wu ea923922ba partial handle & Pass.getUniform (#5356)
* linter fix

* partial handle & getUniform
2019-09-10 10:35:02 +08:00
SijieWang b215a60e3e Delete some of the Editor references (#5345)
* Delete some of the Editor references

* review code

* test case
2019-09-09 09:58:31 +08:00
Yun Hsiao Wu 0d4bf98f61 wx audio global callbacks (#5310)
* some linter fix

* wx audio global callbacks
2019-09-02 04:30:08 -05:00
jiaxin.lai 37a10deb8d tween tweaks (#5128)
* tweaks of tween

* using deprecated framework

* tweak
2019-08-12 17:36:31 +08:00
jiaxin.lai 0c02eaa69c add latest module && add deprecated framework (#5005) 2019-07-30 10:16:41 +08:00