Skip to content

Commit

Permalink
fix: Rename utils folder to renderer/utils
Browse files Browse the repository at this point in the history
Renamed the path for the utils folder to be more specific to the renderer subdirectory. Removed the unused camelize function from the file.
  • Loading branch information
Mr.Mao committed Jun 4, 2023
1 parent 28e8478 commit 8636b4b
Show file tree
Hide file tree
Showing 5 changed files with 3 additions and 16 deletions.
1 change: 1 addition & 0 deletions .eslintrc
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"rules": {
"vue/no-deprecated-html-element-is": "off",
"vue/component-name-in-template-casing": "off",
"no-case-declarations": "off",
"vue/no-deprecated-filter": "off"
}
}
2 changes: 1 addition & 1 deletion packages/renderer/src/global.ts
Original file line number Diff line number Diff line change
Expand Up @@ -78,9 +78,9 @@ declare module '@vue/runtime-core' {

declare module 'pixi.js' {
interface Filter {
parent: Container
_vp_name: string
_vp_filter: boolean
parent: Container
}
interface Container {
_vp_name: string
Expand Down
1 change: 0 additions & 1 deletion packages/renderer/src/index.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
export * from './global'
export * from './renderer'
export * from './compiler'
export * from './utils'

1 change: 1 addition & 0 deletions packages/renderer/src/renderer/index.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
export * from './renderer'
export * from './utils'
export {
setObjectProperty,
setPointProperty,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@
import type { IBaseTextureOptions } from 'pixi.js'

import { Texture } from 'pixi.js'
import { camelize } from 'vue-demi'

export function setTextureOptions(texture: Texture, options: IBaseTextureOptions = {}) {
for (const key in options)
Expand All @@ -16,19 +15,6 @@ export function normalizeTexture(value: Texture | string): Texture {
return value
}

export function encodeText(text: string) {
return text.replace('\n', '&')
}

export function isCustomFilter(prefix: string, name: string) {
const isPrefix = name.startsWith(prefix)
name = camelize(name)
name = name.charAt(0).toUpperCase() + name.slice(1)
return (
isPrefix && name.slice(prefix.length) === 'Filter'
) || name === 'Filter'
}

export function isOn(props?: any) {
return Object.keys(props || {}).some(p => p.startsWith('on'))
}

0 comments on commit 8636b4b

Please sign in to comment.